const LightKV = require("lightkv");

const faceDB = new LightKV('face_db.lkv', 'c+', LightKV.OBJECT); // 存储录入的人脸信息
const devDB = new LightKV('dev_db.lkv', 'c+', LightKV.STRING); // 存储场景设备devid

/**
 * {
 *   lwir_camera_lock_light: {
 *      devids: string[];
 *      settings: {
 *        faces: Array<{name: string, keys: []}>
 *      }
 *   }
 * }
 */
 const sceneDB = new LightKV('scene_db.lkv', 'c+', LightKV.OBJECT);

module.exports = { faceDB, devDB, sceneDB };